<template>
	<view>
		<view>
			<navigator url="/pages/com/cardViewPage/cardViewPage" class="smart-panel-h">
				<text>置顶新闻</text>
			</navigator>
			<navigator url="/pages/com/Newspage/Newspage" class="smart-panel-h">
				<text>新闻</text>
			</navigator>
			<view class="smart-container">1.容器</view>
			<navigator url="/pages/com/view/view" class="smart-panel-h">
				<text> view视图</text>
			</navigator>
			<view hidden="true" class="smart-panel-h" @click="goDetailPage('api')">
				<text>scorll-view滚动视图</text>
			</view>
			<view hidden="true" class="smart-innel-panel" @click="goDetailPage('demospage')">
				<text>swiper可滑动视图</text>
			</view>
			<view class="smart-container">2.基础内容</view>
			<navigator url="/pages/com/text/text" class="smart-panel-h">
				<text>text文本编辑</text>
			</navigator>
			<navigator url="/pages/com/icon/icon" class="smart-panel-h">
				<text>icon图标</text>
			</navigator>
		</view>
		<!-- 表单组件 -->
		<view class="smart-container">3.表单组件</view>
		<navigator url="/pages/com/button/button" class="smart-panel-h">
			<text>button按钮</text>
		</navigator>
		<navigator url="/pages/com/checkkk/checkkk" class="smart-panel-h">
			<text>check多选框</text>
		</navigator>
		<navigator url="/pages/com/lable/lable" class="smart-panel-h">
			<text>label标签组件</text>
		</navigator>
		<navigator url="/pages/com/inputt/inputt" class="smart-panel-h">
			<text>input输入框</text>
		</navigator>
		
		<view class="smart-panel-h" @click="goDetailPage('grammar')">
			<text>textra多行文本输入</text>
		</view>
		<navigator url="/pages/com/form/form" class="smart-panel-h">
			<text>form表单</text>
		</navigator>
		<view class="smart-container">4.导航组件</view>
		<navigator url="/pages/com/navigatorr/navigatorr" class="smart-panel-h">
			<text>navigator</text>
		</navigator>
	</view>

</template>



<script>
	export default {
		data() {
			return {
				account:null
			}
		},
		onshow(){
			console.log("组件页onshoW");
			uni.getStorage({
				key:'Account',
				success(result) {
					console.log("获取成功"+JSON.stringify(result));
					this.account=result.data;
				},fail(err) {
					console.log("获取失败"+JSON.stringify(err));
				}
			})
		},
		methods: {
			goDetailPage(e) {
				if (typeof e === 'string') {
					uni.switchTab({
						url: '/pages/tabBar/' + e + '/' + e
					});
				} else {
					uni.switchTab({
						url: e.url
					});
				}
			}
		}
	}
</script>


<style>
	.smart-innel-panel {
		background-color: #aa99ff;
		flex-direction: row;
		align-items: center;
		padding: 12px;
		margin-bottom: 2px;
	}
</style>